package com.itheima.service;

import com.itheima.pojo.PageResult;
import com.itheima.pojo.Result;
import com.itheima.pojo.User;
import com.itheima.pojo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

public interface UserService {

    /**
     * 通过添加查询user
     * @param user
     * @return
     */
    User getUser(User user);

    /**
     * 根据uid查询user
     * @param uid
     * @return
     */
    User getUserByUid(String uid);

	PageResult getList(UserVO userVO);

    int delete(String uid);

    //编辑用户信息
    int edit(UserVO userVO);

    //web 用户登录
    Result login(UserVO userVO,HttpServletRequest request );

    //查询用户名是否存在
    User findUser1ByName(String userName);

    //完成用户注册
    int register(UserVO userVO, HttpServletRequest request) throws Exception;

    //查询用户旧密码是否正确
    User findUserBypassWord(String oldPwd);

    //修改用户密码
    int updatePassWord(Map map);

    // 获取用户信息
    Map<String, Object> verify(String username) throws Exception;

    /**
     * 重置用户密码
     * @param userVO
     */
    void resetUserPassword(UserVO userVO);

}
